
// PatchGeneratorDoc.h : interface of the CPatchGeneratorDoc class
//


#pragma once

#include "Mesh.h"
#include "FnMeshRenderer.h"
#include "FnPatchGenerator.h"

class CPatchGeneratorDoc : public CDocument
{
protected: // create from serialization only
	CPatchGeneratorDoc();
	DECLARE_DYNCREATE(CPatchGeneratorDoc)

// Attributes
public:

// Operations
public:

// Overrides
public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);

// Implementation
public:
	virtual ~CPatchGeneratorDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()


public:
 Mesh                      mesh_;
 FnMeshRenderer			   renderer_;
 FnPatchGenerator		   patch_generator_;
  std::vector<OpenMesh::VertexHandle> m_selected_vertices;

public:
  void addSelectedVertex(OpenMesh::VertexHandle _vh) { m_selected_vertices.push_back(_vh); }
  void drawSelectedVertices();

public:
  afx_msg void OnFileOpen();
  afx_msg void OnGeneratorInitpatches();

  afx_msg void OnGeneratorUpdatePatches();
  afx_msg void OnGeneratorReadinitpatchinfo();
  afx_msg void OnGeneratorDebugcorners();
  afx_msg void OnGeneratorExtractpatchinfo();
  afx_msg void OnGeneratorParameterization();
  afx_msg void OnGeneratorExporttag();
};


